To run the SNMP Sample Agent, you need to install the AppleTalk Connection disk and/or the TCP/IP Connection disk. In addition, the AppleTalk Administration disk and/or the TCP/IP Connection disk contains other files you may need later.
Installation procedure
====================
Pre-requisites:
--------------
To install and run MacSNMP you will need a Macintosh computer running System 7.0 or later.
Procedure:
----------
1. Run the Installer which is found on the “AppleTalk Connection” disk. The Installer will install the MacSNMP files into the correct folders in the System Folder. In addition to installing the SNMP software, the Installer makes sure that you are using the correct version of AppleTalk and Network drivers. The Installer also installs the "Shared Library Manager".
The Shared Library Manager and MacSNMP will become active when your machine is restarted.
2. Place a copy of the "SNMP Sample Agent" (found in the Tools folder of the MacSNMP Developer disk) into your System Extensions folder.
3. Restart your Macintosh. The sample agent, as shipped, is set to preload at system startup.
This can be changed by modifying statements in the code (see the sample agent code).
4. The agent should now be installed. You may now use the SNMP Tool "DrWatson" in SNMP/DDP mode to query the agent. This tool, along with the "SNMPAgentTool" for loading and unloading agents, can be found in the Tools folder of the "MacSNMP Developer" disk. You can also use the "MacSNMP Admin" setup application (found on the "AppleTalk Administration" disk) to view or modify the community configuration and view variable values and other information.
Note: There is also a "MacSNMP Client" application (found on the "AppleTalk Connection" disk) which can be used to view configuration and variable values, but which cannot be used to make configuration changes.
5. To remove the agent, either remove it from your extensions folder and reboot, or use the
"SNMPAgentTool" to shut it down.
Nota Bene:
----------
The libraries and header files from the “ASLM Developer Tools” version 1.1.1 that are included in this disk are compatible with the “Shared Library Manager” version 1.1.2.
Building the “SNMP Sample Agent”
===============================
Pre-requisites:
--------------
Files you need to be able to build the Sample Agent. These can be found in the E.T.O. CD
ROM:
1. MPW 3.2 or later
2. MPW C++ 3.2 or later
3. Installation of MacSNMP as described above
4. The "MacSNMP Developer" disk version 1.1
Procedure:
---------
1. Copy the entire MacSNMP Developer disk into a folder named "MacSNMP Developer" on your hard disk.
2. Launch MPW 3.2 and add the Tools folder in MacSNMP developer Folder to the command search path. This is done by a single command from the shell (where Path is the location of the folder.)
Set Commands "Path:MacSNMP Developer:Tools:,{Commands}"
3. Modify the files SampleAgent.exp, SampleAgent.cp, SampleAgent.h, SampleVar.h, and SampleAgent.r to suit your needs.
- The Shared Library Manager Interfaces are in the “MacSNMP Developer:Shared Library Manager Interfaces” folder.
- The SNMP Interfaces are in the “MacSNMP Developer:SNMP Interfaces” folder.
- The Sample Agent sources are in the “MacSNMP Developer:Sample Agent:source”
folder.
- The Sample Agent objects are in the “MacSNMP Developer:Sample Agent:objects”
folder.
4. In MPW, set the Directory to “MacSNMP Developer:Sample Agent:”.
5. In MPW, select the item “Build…” from the Build menu. When the dialog appears type “All” and press the enter button.
6. When the build completes, the built SNMP Sample Agent will be in the “MacSNMP Developer:Sample Agent:built:” folder. Move the newly built Sample Agent into your Systems Extensions Folder (NOTE : If the Sample agent is already in the extensions folder, you will have to remove it before placing the new one in the folder).
7. If the preload option is set on the sample agent (see sample agent code), you can load the new sample agent by restarting your Macintosh. This will automatically load it. If the preload option is not set, or you do not wish to restart your machine, you can load the new Sample Agent using the “SNMPAgentTool” as follows:
- Use the “SNMPAgentTool” to remove the old sample agent.
- Move the old sample agent out of the extensions folder (if you haven't already)
and place the new one in the extensions folder.
- Use the “SNMPAgentTool" to load the new sample agent.
NOTE: Upon modifying the SNMP Sample Agent, errors could be introduced which would prevent it from loading. If this happens, you might not be able to startup your machine. To work around this you can hold down the shift key while restarting. This will prevent the Shared Library Manager and all libraries (including MacSNMP) from loading.